﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 责任链模式
{
    //公司采购，金额（请求）在多少范围内 由哪个领导签字

    class Program
    {
        static void Main(string[] args)
        {
            Manager manager = new Manager("张三");
            VicePresident vpre = new VicePresident("李二");
            President pre = new President("胡一");
            manager.nextApprove = vpre;
            vpre.nextApprove = pre;

            RequestMoney m1 = new RequestMoney(5000);
            RequestMoney m2 = new RequestMoney(12000);
            RequestMoney m3 = new RequestMoney(30000);
            RequestMoney m4 = new RequestMoney(300000);

            manager.ProcessRequest(m1);
            manager.ProcessRequest(m2);
            manager.ProcessRequest(m3);
            manager.ProcessRequest(m4);

            Console.ReadLine();
        }
    }
  

    
}
